<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="./jquery.js"></script>
    <script type="text/javascript" src="./stickytooltip.js"></script>
    <link href="stickytooltip.css" rel="stylesheet" type="text/css">
<title>Công nghệ Web & Ứng dụng</title>
</head>
<?php
    require_once("mysql.php");
    require_once("function.php");
    
   
    $danhsach_caocap = Sanpham();
    $danhsach_caocap1 = Sanpham();
?>
<h2>Danh Sách Tất Cả Sản Phẩm Cao Cấp</h2>

<table border="1">
   
     <?php
        $stt=0;
        while($rows_moi = mysql_fetch_array($danhsach_caocap) )
        {
            if($rows_moi['Gia']>20000001)
            {
                    ?>
                    <td width='150' height='150'><?php echo $rows_moi['TenSP'];?><br/>
                <a href="Chitietsanpham.php?page=chitiet/../dtdd&idSP=<?php echo $rows_moi['idSP'];?>" data-tooltip="sticky<?=$stt;?>">
                <img src="upload/sanpham/hinhchinh/<?php echo $rows_moi['UrlHinh']?>" width="100" height="100" align="center"/>
                <?php
                    if($rows_moi['New']==0)
                    echo '<img src="img/new.gif" width="29" height="19" align="top">'; 
                ?>
                   <span type="text"><?php echo number_format($rows_moi['Gia'],2)?></span>VNĐ<br/>
                    <?php  $stt++;?>
                    <?php
                        if($stt%3==0)
                           echo"</tr><tr>";
              	  ?>
             <?php }?>
      <?php }?>
     
 </table>
           
       <!-- HTML tooltip -->
       <div id="mystickytooltip" class="stickytooltip">
              <div style="padding: 5px">
                     <?php
                        $so=0;
                      while($rows_moi1 = mysql_fetch_assoc($danhsach_caocap1))
                        { 
                           if($rows_moi1['Gia']>20000001)
                           {
                            ?>
                        <div id="sticky<?=$so++?>" class="atip" style="width: 200px">  
                                <?=$rows_moi1['TenSP']?><br/>
                                    <img src="upload/sanpham/hinhchinh/<?=$rows_moi1['UrlHinh']?>"><br/>
                                        <?php 
                                           if($rows_moi1['New']==0) 
                                              echo '<img src="img/new.gif" width="29" height="19" align="top"><br/>';
                                         ?>
                                        <span type="text"><?php echo number_format($rows_moi1['Gia'],2)?></span>VNĐ<br/>
                        </div>
                  <?php }}?>
                </div>
       </div> 
</html>
